const errorHandle = {
  error(app, logger) {
    app.use(async(ctx, next) =>{
      await next();
      if(ctx.status != 404) return;
      logger.error('page miss');
      ctx.body ='<script type="text/javascript" src="//qzonestyle.gtimg.cn/qzone/hybrid/app/404/search_children.js" charset="utf-8" homePageUrl="http://yoursite.com/yourPage.html" homePageName="回到我的主页"></script>';
    })
  }
}

export default errorHandle;